package com.ruoyi.tester.executor;

import com.mashape.unirest.http.HttpResponse;
import com.ruoyi.tester.domain.InterfaceCallLog;
import com.ruoyi.tester.domain.TaskInterfaceEffectiveInfo;
import com.ruoyi.tester.executor.http.XzfHttpResult;

import java.util.List;
import java.util.Map;

/**
 * @description 额外处理器
 * @author SongJun
 * @date 2022/4/20 13:53
 */
public interface IExtraHandler {
    public static String _PROCESSING_ = "_PROCESSING_";
    /**
     * @description 处理依赖参数
     * @author SongJun
     * @date 2022/4/21 14:01
     */
    void cureDependParam(TaskInterfaceEffectiveInfo interfaceInfo, Map<Long, String> calledStatus);
    /**
     * @description 判定接口返回值是否满足期望
     * @author SongJun
     * @date 2022/4/21 14:03
     */
    boolean judgeResponse(TaskInterfaceEffectiveInfo interfaceInfo, XzfHttpResult httpResponse);
    /**
     * @description 获取后续任务
     * @author SongJun
     * @date 2022/4/20 13:53
     */
    List<TaskInterfaceEffectiveInfo> followedInterfaceInfoList(Long relationId, List<TaskInterfaceEffectiveInfo> effectiveList, Map<Long, String> caldStatus);
    /**
     * @description 保存调用结果
     * @author SongJun
     * @date 2022/4/20 13:54
     */
    void saveResult(InterfaceCallLog interfaceCallLog, String progres);
}
